/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#include <stdio.h>
#include <unistd.h>
#include "ohos_types.h"
#include "ohos_init.h"
#include "hilog/log.h"
#include "time_adapter.h"
#include "iunknown.h"
#include "service.h"

#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdbool.h> // 添加这个头文件以使用 bool 类型
#include <stdarg.h> // 对于C程序  

#include "localota.h"

/**********************************************************************************/
// static char *deviceJSON = "{\"deviceInfo\":{\"name\":\"D1062140731725D001\",\"type\":\"\",\"provisionDeviceKey\":\"8bzljm4kom79simkhi2r\",\"provisionDeviceSecret\":\"t52ecibg3dreseqaieco\",\"isIPC\":0,\"isGateway\":1},\"otaInfo\":{\"firmwareFilePath\":\"/PowerHarmony/SMC/download/\",\"upgradeFileName\":\"/PowerHarmony/SMC/script/upgrade.sh\",\"rebootFileName\":\"/PowerHarmony/SMC/script/notifyReboot.sh\",\"statusFileName\":\"/PowerHarmony/SMC/download/upgradeStatus.ini\",\"recordFileName\":\"/PowerHarmony/SMC/download/record.json\"},\"logInfo\":{\"logFile\":\"\",\"logFileMaxSize\":5242880,\"logLevel\":3}}";


// //  直连设备或者网关设备
// typedef struct DEVICE_INFO
// {
//     char name[64];
//     char type[32];
//     char isGateway; 
//     char isIPC; 
//     char provisionDeviceKey[64];
//     char provisionDeviceSecret[64];       

//     char firmwareFilePath[128];
//     char upgradeFileName[128];
//     char rebootFileName[128];
//     char statusFileName[128];
//     char recordFileName[128];

//     char logFile[64];
//     unsigned int logFileMaxSize;
//     char logLevel;
// }DEVICE_INFO;
// DEVICE_INFO   deviceInfo={0};

// typedef struct ph_mqttInfo
// {
//     char ip[64];
//     int  mqttPort;
//     int  httpPort;
//     char userName[64];
//     char passwd[64];
//     char certFile[64];
//     char qos;
// }ph_mqttInfo;

// ph_mqttInfo *g_pMqttInfo = NULL;


/**********************************************************************************/




/**********************************************************************************/

uint32_t LocalGetCurrentInfo(struct UpdateLiteInfo *info)
{
    HILOG_INFO(LOG_CORE, "mqtt_ota.c ---- .... LocalGetCurrentInfo\n");

    return 0;
}

